//
//  TSFindActivityCell.m
//  TaShuo
//
//  Created by N-X on 2018/3/19.
//  Copyright © 2018年 MRNAN. All rights reserved.
//  活动

#import "TSFindActivityCell.h"

NSString * const kFindActivityCellID = @"kFindActivityCellID";

@implementation TSFindActivityCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addSubview:self.collectionView];
    }
    return self;
}

- (UICollectionView *)collectionView
{
    if (!_collectionView) {
        UICollectionViewFlowLayout * layout = [[UICollectionViewFlowLayout alloc]init];
        _collectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:layout];
        _collectionView.contentInset = UIEdgeInsetsMake(0, 10, 5, 10);
        layout.minimumInteritemSpacing = 10;
        layout.minimumLineSpacing = 10;
        _collectionView.backgroundColor = NX_ColorFromRGB(242, 242, 242);
    }
    return _collectionView;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.collectionView.frame = self.bounds;
}

@end
